import 'package:flutter_test/flutter_test.dart';
import 'package:move_task_to/move_task_to.dart';
import 'package:move_task_to/move_task_to_method_channel.dart';
import 'package:move_task_to/move_task_to_platform_interface.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockMoveTaskToPlatform with MockPlatformInterfaceMixin implements MoveTaskToPlatform {
  @override
  Future<String?> getPlatformVersion() => Future.value('42');

  @override
  Future<void> moveTaskToBack() {
    // TODO: implement moveTaskToBack
    throw UnimplementedError();
  }
}

void main() {
  final MoveTaskToPlatform initialPlatform = MoveTaskToPlatform.instance;

  test('$MethodChannelMoveTaskTo is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelMoveTaskTo>());
  });

  test('getPlatformVersion', () async {
    MockMoveTaskToPlatform fakePlatform = MockMoveTaskToPlatform();
    MoveTaskToPlatform.instance = fakePlatform;

    expect(await MoveTaskTo.getPlatformVersion, '42');
  });
}
